<h1> <%= @category.name %> </h1>



<p id="notice"><%= notice %></p>
<p>
<%= link_to 'Add new product', new_product_path, :class => 'gray-btn' %>
</p>

<div id="products">
  <table class="datagrid">
    <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
      <th>Category</th>
      <th>Barcode</th>
      <th>Quantity</th>
      <th>Price</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
    </thead>
    <tbody>
        <% @category.products.each do |product| %>
            <%= render :partial => "products/products", :locals => {:product => product} %>
        <% end %>
    </tbody>
  </table>
</div>

<%= link_to 'Edit', edit_category_path(@category) %> |
<%= link_to 'Back', categories_path %>
